<html>
<head>
  <title>Welcome !!!</title>
    <style>
	#backg{
		background: #191919 url(images/img04.jpg) repeat;
		color: yellow;
		margin: 200px;
		align: center;
	}
	#enter{
		color: yellow;
	}
  </style>
</head>
<body id="backg">


	<?php
		if(isset( $_POST["insertuser"] )){			$HO 		= $_POST["HO"];
			$TEN 		= $_POST["TEN"];
			$MA_NV 		= $_POST["MA_NV"];
			$NGAY_SINH 	= $_POST["NGAY_SINH"];
			$EMAIL 		= $_POST["EMAIL"];
			$MS_THUE 	= $_POST["MS_THUE"];
			$LUONG 		= $_POST["LUONG"];
			$MA_TP 		= $_POST["MA_TP"];
			$MA_PB 		= $_POST["MA_PB"];
			$user = "iss";
			$pass = "password";
			
			
			$conn= oci_connect($user, $pass, "orcl");
			if (!$conn) {
				$e = oci_error();
				trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
			}
			
			$stid = oci_parse($conn, "insert into NHAN_VIEN values (:HO,:TEN,:MA_NV, to_date(:NGAY_SINH,'dd/MM/yyyy') , :EMAIL, :MS_THUE, :LUONG, :MA_TP, :MA_PB)");
			oci_bind_by_name($stid, ':HO', $HO);
			oci_bind_by_name($stid, ':TEN', $TEN);
			oci_bind_by_name($stid, ':MA_NV', $MA_NV);
			oci_bind_by_name($stid, ':NGAY_SINH', $NGAY_SINH); // $data = date("d-M-Y H:i:s");
			oci_bind_by_name($stid, ':EMAIL', $EMAIL);
			oci_bind_by_name($stid, ':MS_THUE', $MS_THUE);
			oci_bind_by_name($stid, ':LUONG', $LUONG);
			oci_bind_by_name($stid, ':MA_TP', $MA_TP);
			oci_bind_by_name($stid, ':MA_PB', $MA_PB);

			$r = oci_execute($stid);
			if ($r) {
				
				print "<h1><i>Thank you!, One employee'information inserted</i></h1>";
			}
			oci_free_statement($stid);
			oci_close($conn);

		}
	?>

  <br/><br/>


</body>
</html>

